.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #f5f5f5;
}

.header {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background: #007aff;
  color: white;
  font-size: 16px;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  position: fixed; 
  top: 0; 
  left: 0;  
  width: 100%; 
  z-index: 10;  
}

.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover; 
}

.header-info {
  display: flex;
  flex-direction: column;
}

.header-name {
  font-weight: bold;
}

.chat-box {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  // margin-top: 70rpx;  /* 给聊天框留出空间，避免被 header 遮挡 */
}

.message {
  display: flex;
  align-items: center;
  margin: 10px 0;
  max-width: 80%;
  width: 100%;
}

.consumer {
  align-self: flex-end;
  flex-direction: row-reverse;
  margin-left: auto;
}

.waiter {
  align-self: flex-start;
}

.bubble {
  padding: 12px 18px;
  border-radius: 16px;
  word-wrap: break-word;
  background: #ffffff;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.12);
  max-width: 75%;
  font-size: 14px;
  word-break: break-word;
}

.consumer .bubble {
  background: #007aff;
  color: white;
}

.waiter .bubble {
  background: #f2f2f2;
  color: #333;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  margin: 0 12px;
  border: 2px solid #dcdcdc;
}

.input-box {
  display: flex;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.08);
  justify-content: space-between;
  align-items: center;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 10;
  margin: 0;
}

.input {
  flex: 1;
  padding: 12px 18px;
  border-radius: 25px;
  border: 1px solid #ddd;
  background-color: #f8f8f8;
  font-size: 14px;
  color: #333;
  transition: border-color 0.3s ease;
}

.input:focus {
  border-color: #007aff;
}

.send-btn {
  padding: 12px 20px;
  border: none;
  background: #007aff;
  color: white;
  cursor: pointer;
  border-radius: 25px;
  font-size: 14px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.send-btn:active {
  transform: scale(0.95);
}

.send-btn:hover {
  background: #0051a8;
}
